package com.prs.crm.domain.crm;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
/**
 * 故障
 * @author zhoupeng 2012-2-24
 *
 */
@Entity
@Table(name="crm_fault")
public class Fault extends BaseEntity{
	private static final long serialVersionUID = 1L;
	
	@Id@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	
	private String fault;  //故障信息
	private String linkman;  //申报联系人
	private String phone;  //联系电话
	private String price;  //维修费用
	private String person;  //接受人
	private String day;  //接受时间
	private String isshe;  //是否跟换设备
	private String isyou;  //是否邮寄
	private String isbao;  //报修期内
	private String state;  //状态
	private String result;  //处理结果
	@ManyToOne
	private CustomerProject customerProject;  //关联项目
	@ManyToOne
	private ProjectContract projectContract;  //关联项目合同
	//设置明细
	@OneToMany(fetch=FetchType.LAZY,mappedBy="fault")
	private Set<Equipment> equipments;
	//客户反馈
	@OneToMany(fetch=FetchType.LAZY,mappedBy="fault")
	private Set<FaultFeedback> feedbacks;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getFault() {
		return fault;
	}
	public void setFault(String fault) {
		this.fault = fault;
	}
	public String getLinkman() {
		return linkman;
	}
	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getPerson() {
		return person;
	}
	public void setPerson(String person) {
		this.person = person;
	}
	public String getDay() {
		return day;
	}
	public void setDay(String day) {
		this.day = day;
	}
	public String getIsshe() {
		return isshe;
	}
	public void setIsshe(String isshe) {
		this.isshe = isshe;
	}
	public String getIsyou() {
		return isyou;
	}
	public void setIsyou(String isyou) {
		this.isyou = isyou;
	}
	public String getIsbao() {
		return isbao;
	}
	public void setIsbao(String isbao) {
		this.isbao = isbao;
	}
	public Set<Equipment> getEquipments() {
		return equipments;
	}
	public void setEquipments(Set<Equipment> equipments) {
		this.equipments = equipments;
	}
	public CustomerProject getCustomerProject() {
		return customerProject;
	}
	public void setCustomerProject(CustomerProject customerProject) {
		this.customerProject = customerProject;
	}
	public ProjectContract getProjectContract() {
		return projectContract;
	}
	public void setProjectContract(ProjectContract projectContract) {
		this.projectContract = projectContract;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getResult() {
		return result;
	}
	public void setResult(String result) {
		this.result = result;
	}
	public Set<FaultFeedback> getFeedbacks() {
		return feedbacks;
	}
	public void setFeedbacks(Set<FaultFeedback> feedbacks) {
		this.feedbacks = feedbacks;
	}
	
}
